package cn.wolfcode.trip.app.controller;

import cn.wolfcode.trip.base.domain.Answer;
import cn.wolfcode.trip.base.query.QueryObject;
import cn.wolfcode.trip.base.service.IAnswerService;
import cn.wolfcode.trip.base.util.JSONResult;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("answers/detail")
public class AnswerDetailController {

    @Autowired
    private IAnswerService answerService;

   /* @PostMapping
    public JSONResult save(Answer answer){
        answerService.save(answer);
        return new JSONResult();
    }*/

    @GetMapping("/{id}")
    public Answer selectById(@PathVariable Long id){
        return answerService.getById(id);
    }

}
